Results 1 to 9 of 9
  1. #1
    Join Date
    May 2004
    Posts
    38

    Question Unanswered: Form to display certain fields on report

    Is there a way to get a database to display certain fields on a report at anyone time. What i need when someone choose to display a report on the data is form that pops up which I have it has all the fields in the previous form with check boxes so the user can display what they want on the report. What I need is there choices to apply to the report just displaying those fields chosen all together as apposed to just hiding the field so there is a big gap I want the data to go along one line so a number of lines can be displayed on the report. Is this possible???

    Thank you for any responses

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Let me guess: You're trying to rewrite the Report Wizard?

    This question is so incredibly openended it isn't funny ...How specific is this report? Does all the fields you have on the form appear in the report if selected? Is the data all related?
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    May 2004
    Posts
    38
    Yes if all fields are selected then they would all appear but I have got an check box option to display all data rather than the user selecting every field. The data is all related to one particular field. a user searches for an address the user will click the search button which will give the select form the user then selects address, age ad name but not occupation, birth town or date of birth. So the report will just display address age and name.

  4. #4
    Join Date
    May 2004
    Posts
    38
    Does anyone have any ideas as to how to do it, I do realise it virtually recreating the wizard but it is crucial to the users to have this option.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes you can do it by reconfiguring the report in the reports on open event but you are taking on a potential developemnt nightmare. Is there aw way that you can redfeinf the requirements to say 2 or possibly 3 reports (eg full access, limited access and restricted access)

    one strategy may be to populate a report with all the relevant columns defined and then hide or show columns as required (based on settigns in the calling form), relaying out the required columns based on the current position of the last valid control

    ie each control.left is equal to previouscontrol.left + previouscontrol.width + spacer

    Good luck!

  6. #6
    Join Date
    May 2004
    Posts
    38
    I can't have different access rights for the report, different users will choose different option depening on the data they need at that time. A user who has chosen three options will not necessarily choose those three options again the next time round he or she may choose all fields, or just one field or 8 fields.

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi Lisa

    I have done this for a report with a fairly small number of fields - it was a nightmare and ultimately less flexible and scalable than I anticipated when I had the "vision". Perhaps there is a technique someone has used that is better however I would urge you to be absolutely certain that this is really "crucial to the users to have this option".

    Alternatively, I export a lot of my data to Excel now (allows users to really get hold of data and manipulate it). I assume that if you are trying to dynamically create reports you are not intending to do any fancy formatting? If so, you might as well put your plans for the next year aside but you will have a product that would be commercially viable. If not, why not just build some dynamic SQL and create queries on the fly? Pop it in a recordset and it is trivial to export it to Excel.

    Otherwise I would go with Healdom's two suggestions.

    Finally - have you searched for a third party product, BTW?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  8. #8
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    DOH! Why didn't I think of it earlier ... Why don't you create a report for every possible permutation? Then instead of trying to write a report wizard you call the appropriate report based on the selected criteria ...
    Back to Access ... ADO is not the way to go for speed ...

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Lisa
    I'm not suggesting cvreating a report based on access rights, merely suggesting that you have say 3 reports
    1 with everything on
    1 with a restricted set of columns (IE less than the first report)
    1 with a very limited set of columns


    It comes down to how you expect your users to to access the data. Ie is it possible to analyse the problem down to a limited set of data and create a reprot for each idnetifiable data set. its not a clever solution but it may resolve your problem without havign to replicate Access internal report wizard.

    A third possibility is to create a single query usign the querdef object, give it a unique name say temp<userid> then get your users to create a report based on that query using the report wizard. Your form that creates the querydef object may also need to do some housekeeping to keep the number of temporary queries down to a reasonable number. This approach will fail if you deploy your applications using runtime, or if you restrict usage of the app via a switchboard and security procedures or if you use a single front end, accessed by multiple users concurrently
    - effectively you are giving design rights to the app to indivdual users - something personally I wouldn't be happy to do.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •