Sort Column When Printing Selecting Records 追蹤

0
Avatar
Legacy Poster

Hi, im trying to display a certain column as the second column in the ´select records´ screen when printing. I can get this to work by using the SQL feature, but since im also using the query prompt, im wondering if it is possible to set a specific column as the second column in this screen.

3 意見

0
Avatar
Ian Einman
評論操作 永久連結

By the "SQL feature" do you mean using Custom SQL?  You can still use Query Prompts in conjunction with custom SQL.  The Query Prompts button is still available to let you define them, and then they can be referenced with custom SQL that looks like this:

 

SELECT MyField2,MyField4 FROM MyTable WHERE "MyField2" = ?QueryPrompt1

 

Is that helpful or did I misunderstand your question?

0
Avatar
Legacy Poster
評論操作 永久連結

Hi, i tried above but it returned an error. Below is my code:

 

SELECT `Product`, `Content`, `NSF2`, `NSF3`, `INS1`, `INS2`, `INS3`, `NSFcode1`, `NSFcode3`, `INScode1`, `INScode2`, `INScode3`, `NSFcode2`, `NSFTEXT1`, `NSFTEXT2`, `NSFTEXT3`, `NSF1` FROM `DATA_MATRIX$` WHERE ´Product´ = ?QueryPrompt1

 

the error is a dispatch error 3092

0
Avatar
Ian Einman
評論操作 永久連結

I would actually expect it to work, we'll need to look at it in more depth.  Please send an e-mail to tech support so it gets into our system and you can be notified when we fix it.  We'll need more info about the database and so forth.

 

Another way to do this is that in your SQL database you can create a new "view", which shows the DATA_MATRIX$ table but with the specific columns (and column order) you want.  You would do it sort of like this:

 

CREATE VIEW DATA_MATRIX_REORDERED AS SELECT `Product`, `Content`, `NSF2`, `NSF3`, `INS1`, `INS2`, `INS3`, `NSFcode1`, `NSFcode3`, `INScode1`, `INScode2`, `INScode3`, `NSFcode2`, `NSFTEXT1`, `NSFTEXT2`, `NSFTEXT3`, `NSF1` FROM `DATA_MATRIX$`

 

Then you would use the DATA_MATRIX_REORDERED view, instead of the DATA_MATRIX table.  You don't need custom SQL and you should be able to use query prompts. 

 

If you don't have the ability to create a view on your database, unfortunately you may be stuck with not being able to control the column order.  We plan to improve that record selector eventually but right now the column order cannot be customized.

登入寫評論。