Results 1 to 17 of 17

Thread: [RESOLVED] How to Embed CR instead of copying it

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Resolved [RESOLVED] How to Embed CR instead of copying it

    Hi,
    Anyone know how to embed the CR instead of having to physically distribute it with the app?
    I have this code which works fine but I want to get rid of the Reports folder.

    Code:
    cr.Load(strAppPath & "\Reports\SchDaysPerDept.rpt")
    I tried changing the build action to embedded source and changed the path to just the report name but it didn't work either.
    Thanks!

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: How to Embed CR instead of copying it

    I found the solution!!!! Woo hoo!! I have been looking for this for so long. Turns out, I just needed to dim my variable as new "reportname" instead of ReportDocument!!

    http://www.techsupport.businessobjec...dthereport.htm

    I am so happy!!!

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: [RESOLVED] How to Embed CR instead of copying it

    I don't get it... You still have to deploy the report for you app to work. It's not embedded...

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [RESOLVED] How to Embed CR instead of copying it

    I didn't... I completely removed my .rpt files from my deployment project and it still works.

  5. #5
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: [RESOLVED] How to Embed CR instead of copying it

    Impossible unless you had already deployed the rpt files.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [RESOLVED] How to Embed CR instead of copying it

    How can it be impossible. My reports were pointing to the startuppath/Reports folder which is where they resided. I went into my project and changed the reports to embedded and changed my declarations from reportDocument to the name of the report itself. I then went onto the network drive where the app is located, copied my new files over and made sure the Reports folder was gone, which it was. I can still view the reports. How can it be impossible when I am running this from a network drive which has 0 report files on it?

  7. #7
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [RESOLVED] How to Embed CR instead of copying it

    Because what was deleted was the deployed RPT files.... not the RPT files that are used for development. Two different sets of files.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [RESOLVED] How to Embed CR instead of copying it

    Yes. I understand that. The whole object of this post was to get rid of the deployed .rpt files. Why would I want to get rid of my .rpt files in my development environment?

  9. #9
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [RESOLVED] How to Embed CR instead of copying it

    jre - that wasn't actually directed at you.... it was directed randem...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [RESOLVED] How to Embed CR instead of copying it

    Ohhh. Sorry.

  11. #11
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: [RESOLVED] How to Embed CR instead of copying it

    You asked how to embed them...

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [RESOLVED] How to Embed CR instead of copying it

    Yes and you said "I don't get it... You still have to deploy the report for you app to work. It's not embedded..." But I didn't deploy the reports. There are 0 report files in my deployment. Just forget about it, it works and that's all that matters to me.

  13. #13
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: [RESOLVED] How to Embed CR instead of copying it

    The only way for it to work without the rpt file is if you use the data environment for CR and it has nothing to do with rpt files...

  14. #14
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [RESOLVED] How to Embed CR instead of copying it

    LEt me see if I can paint a clearer picture.... on the development side, the RPT files still exist. However, when deployed, they become EMBEDED into the resource file. Therefore, there are no physical (separate) RPT files on the client.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2006
    Posts
    910

    Re: [RESOLVED] How to Embed CR instead of copying it

    Exactly right techgnome!

  16. #16
    New Member
    Join Date
    Nov 2005
    Posts
    9

    Cool Re: [RESOLVED] How to Embed CR instead of copying it

    Quote Originally Posted by jre1229
    How can it be impossible. My reports were pointing to the startuppath/Reports folder which is where they resided. I went into my project and changed the reports to embedded and changed my declarations from reportDocument to the name of the report itself. I then went onto the network drive where the app is located, copied my new files over and made sure the Reports folder was gone, which it was. I can still view the reports. How can it be impossible when I am running this from a network drive which has 0 report files on it?
    I don't undersend this.
    Can you give me same code and step by step instruction? When and how you do steps?

    Next question: It it posible to load raport from stream? Is sow this in one application where raports file was saved as binary in sql database.

  17. #17
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [RESOLVED] How to Embed CR instead of copying it

    Stream? Probably not... but what you can do is using BLOB, retrieve the binary data from SQL, send the data to a physical file (we use the temp dir and a temp file name) and save it. From there you can Report.Load path-to-rpt-file to open it.

    -tg

    edit: this link should be helpful in learning how to read a BLOB.
    http://support.microsoft.com/default...b;en-us;308042
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

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



Click Here to Expand Forum to Full Width