Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Friday, February 24, 2012

Dynamic Text Field

We have purchase orders that we are pulling from a MSSQL backend, and the report works fine.

However, in the subreport, the users would like to be prompted to enter up to 8 lines of text to be inserted into the report when they execute the report.

I am not sure if this is possible, or how to go about it. I tried using a parameter field, but there is simply not enough space for them to enter in info, and they have to enter multiple lines. I would like to make this as user friendly as possible.

We are using Crystal Reports 7, and may be upgrading to Crystal 11 by the end of the year.

Thank you in advance.Yes u can use parameter field, unfortunately, it does not display multiline but it can accomodate ur requirement, i used it at max length 65000 characters.

im using CRXI|||Actually, I figured out a neat way to do it.

You can create a Word or .rtf file in Wordpad or MSWord, and link it via OLE. That way, they can actually make the text look exactly the way they want it to on the report. It ends up looking really nice, and you can do all the shading and bordering in CR and it works fine.

I've used it in both the .rpt format and compiled it to .exe and they both work as long as the text they want to use was edited and saved before they open the .exe. I just trained the users to do this, and all is working great.

So after banging my head awhile, I finally saw through it and figured out this way.

Thank you for your help, I had tried that, but my users were upset by not being able to view their text. This was the next best way.

Sunday, February 19, 2012

Dynamic Sql to update a table row

Hi All MSSQL Experts-

I am facing a typical problem in one of my store procedure.

I am trying to update a table thru a dynamically generated SQL statement.

In my stored procedure I do all kinds of looping and manipultion to get this statement and execute like this:

mSQL = 'UPDATE TblSomeTable SET FldSomeFile=200 WHERE FldPK=100'
EXEC (mSQL)

This stuff has always worked for me, for Temporary tables, but some how does not seem to work on physical table. Am I doing something wrong? Missing something?

Any help will be greatly appreciated.

Best Wishes,Hi All-

Please never mind, the problem was with my field being int and the value I was trying to set it to was somethnig like 0.233, which eventually kept putting in there...

Regards